/**
 * 简单事件队列类
 */
export class EventQueue<T> {
    private queue: T[] = [];

    push(event: T): void {
        this.queue.push(event);
    }

    shift(): T | undefined {
        return this.queue.shift();
    }

    get length(): number {
        return this.queue.length;
    }

    clear(): void {
        this.queue = [];
    }
}
